package vn.com.bookstore.domain.model;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author QuangMinh
 */
public class Book implements Serializable {
    private static final long serialVersionUID = 1L;
   
    private Integer id;
   
    private String name;
    
    private String title;
   
    private String author;
    
    private int publisherId;
   
    private int bookTypeId;
   
    private double price;
   
    private Date datePublish;
   
    private String status;
   
    private short active;
   
    private double discount;
   
    private Integer numberRepublish;
   
    private String shortDescription;
   
    private String longDescription;
   
    private Boolean isHot;
   
    private Integer likeNumber;
   
    private Date createDate;
    
    private String urlPdfFile;
    
    private String urlImageFile;
    
    public Book() {
    }

    public Book(Integer id) {
        this.id = id;
    }

    public String getUrlPdfFile() {
		return urlPdfFile;
	}

	public void setUrlPdfFile(String urlPdfFile) {
		this.urlPdfFile = urlPdfFile;
	}

	public String getUrlImageFile() {
		return urlImageFile;
	}

	public void setUrlImageFile(String urlImageFile) {
		this.urlImageFile = urlImageFile;
	}

	public Book(Integer id, String name, String title, String author,
			int publisherId, int bookTypeId, double price, Date datePublish,
			String status, short active, double discount,
			Integer numberRepublish, String shortDescription,
			String longDescription, Boolean isHot, Integer likeNumber,
			Date createDate, String urlPdfFile, String urlImageFile) {
		super();
		this.id = id;
		this.name = name;
		this.title = title;
		this.author = author;
		this.publisherId = publisherId;
		this.bookTypeId = bookTypeId;
		this.price = price;
		this.datePublish = datePublish;
		this.status = status;
		this.active = active;
		this.discount = discount;
		this.numberRepublish = numberRepublish;
		this.shortDescription = shortDescription;
		this.longDescription = longDescription;
		this.isHot = isHot;
		this.likeNumber = likeNumber;
		this.createDate = createDate;
		this.urlPdfFile = urlPdfFile;
		this.urlImageFile = urlImageFile;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPublisherId() {
        return publisherId;
    }

    public void setPublisherId(int publisherId) {
        this.publisherId = publisherId;
    }

    public int getBookTypeId() {
        return bookTypeId;
    }

    public void setBookTypeId(int bookTypeId) {
        this.bookTypeId = bookTypeId;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Date getDatePublish() {
        return datePublish;
    }

    public void setDatePublish(Date datePublish) {
        this.datePublish = datePublish;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public short getActive() {
        return active;
    }

    public void setActive(short active) {
        this.active = active;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    public Integer getNumberRepublish() {
        return numberRepublish;
    }

    public void setNumberRepublish(Integer numberRepublish) {
        this.numberRepublish = numberRepublish;
    }

    public String getShortDescription() {
        return shortDescription;
    }

    public void setShortDescription(String shortDescription) {
        this.shortDescription = shortDescription;
    }

    public String getLongDescription() {
        return longDescription;
    }

    public void setLongDescription(String longDescription) {
        this.longDescription = longDescription;
    }

    public Boolean getIsHot() {
        return isHot;
    }

    public void setIsHot(Boolean isHot) {
        this.isHot = isHot;
    }

    public Integer getLikeNumber() {
        return likeNumber;
    }

    public void setLikeNumber(Integer likeNumber) {
        this.likeNumber = likeNumber;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Book)) {
            return false;
        }
        Book other = (Book) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "vn.com.iflex.Book[ id=" + id + " ]";
    }
    
}
